package com.sc.nft.entity.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.EcologyPoolCommunityServiceRankTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author 刘国航
 * @since 2024/8/12 9:54
 */
@Data
public class EcologyPoolCreateDaoCommunityServiceRankConfRpcRequest implements Serializable {
    private static final long serialVersionUID = -5509849478484325264L;

    @ApiModelProperty("品牌ID")
    @NotNull(message = "品牌ID不能为空")
    private Long daoId;

    @ApiModelProperty("榜单名称")
    @NotBlank(message = "榜单名称不能为空")
    private String rankName;

    @ApiModelProperty("榜单类型")
    @NotNull(message = "榜单类型不能为空")
    private EcologyPoolCommunityServiceRankTypeEnum rankType;

    @ApiModelProperty("新增用户/网点阈值")
    @NotNull(message = "新增用户/网点阈值不能为空")
    @Min(value = 0, message = "新增用户/网点阈值不能小于0")
    private Integer newUserCountThreshold;

    @ApiModelProperty("新增熔炼值阈值")
    @NotNull(message = "新增熔炼值阈值不能为空")
    @Min(value = 0, message = "新增熔炼值阈值不能小于0")
    private BigDecimal newEcologySmeltingThreshold;

    @ApiModelProperty("开始时间")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty("活动规则")
    @NotBlank(message = "活动规则不能为空")
    private String activityRule;

    @ApiModelProperty("顶部图")
    @NotBlank(message = "顶部图不能为空")
    private String topImage;

    @ApiModelProperty("关联列表")
    private List<EcologyPoolCreateCommunityServiceRankRelationConfRequest> relationList;

    @ApiModelProperty("收益列表")
    private List<EcologyPoolCreateDaoCommunityServiceRankConfIncomeRequest> incomeList;

}
